package prev

import (
	"gitee.com/game_diamond/consts"
	"gitee.com/game_diamond/model/course"
	"gitee.com/game_diamond/protocols"
	"gitee.com/game_diamond/server"
	"gitee.com/game_diamond/srvws/common"
)

func init() {
	server.RegisterWsAction(consts.ActorStudent, consts.ActionStudentClientPrevClass, ActionStudentPrevClass)
}

func ActionStudentPrevClass(studentId int, body *protocols.WebSocketBody) {
	ss, err := common.GetStudentAiRoomSession(studentId)
	if err != nil {

	}
	//逻辑处理
	//...
	//...
	ss.NodeStat[20] = &course.NodeLearnStat{
		NodeId:   223,
		Accuracy: 120,
	}
	common.SendMessageToUser(0, body, studentId)
}
